package com.carhailing.coupons.parent.child;

import com.alipay.api.AlipayApiException;
import com.carhailing.common.config.AlipaySign;
import com.carhailing.common.domain.order.CarOrder;
import com.carhailing.common.domain.order.CarPayRecord;
import com.carhailing.common.exception.BusinessException;
import com.carhailing.coupons.aliPayVo.AlipayVo;
import com.carhailing.coupons.parent.PayHandle;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;

/**
 * @Author: Gd
 * @package: com.carhailing.coupons.parent.child
 * @Project: Online_Taxi_Project
 * @Name: WeiXinPay
 * @Date: 2024-7-29 10:56
 */
@Service("WeiXin")
@Log4j2
public class WeiXinPay implements PayHandle {
//    @Override
//    public String payCarOrder(CarPayRecord carPayRecord) {
//        return "微信支付";
//    }

    @Override
    public String payCarOrder(AlipaySign alipaySign) throws BusinessException {
        return null;
    }

    @Override
    public void idStatusZero(CarPayRecord carPayRecord) throws Exception {
        log.info("微信支付，支付状态 0 ");
    }

    @Override
    public void queryTradeOrder(Long payRecordordernumber, String payRecordtype) throws Exception {
        log.info("微信支付查询订单");
    }

    @Override
    public AlipayVo notifyInfos(HttpServletRequest request) throws BusinessException, AlipayApiException, UnsupportedEncodingException {
        log.info("微信支付回调");
        return null;
    }

    @Override
    public void refundCarOrder(Long orderNumber, CarOrder carOrder) {
        log.info("微信支付退款");
    }
}
